package com.alexgaoyh.MutiModule.Dubbo.RWSeperate.persist.manager.sysman.sysmanRoleResourceRel;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.MutiModule.common.vo.ZTreeNodes;

public interface SysmanRoleResourceRelMapper {
    int countByExample(SysmanRoleResourceRelExample example);

    int deleteByExample(SysmanRoleResourceRelExample example);

    int deleteByPrimaryKey(SysmanRoleResourceRelKey key);

    int insert(SysmanRoleResourceRelKey record);

    int insertSelective(SysmanRoleResourceRelKey record);

    List<SysmanRoleResourceRelKey> selectByExample(SysmanRoleResourceRelExample example);

    int updateByExampleSelective(@Param("record") SysmanRoleResourceRelKey record, @Param("example") SysmanRoleResourceRelExample example);

    int updateByExample(@Param("record") SysmanRoleResourceRelKey record, @Param("example") SysmanRoleResourceRelExample example);
    
    /**
     * 根据用户id 获取这个用户下包含的资源id集合，并转换为ZTreeNodes格式；
     * @param sysmanUserId	后台用户主键id
     * @return
     */
    List<ZTreeNodes> selectZTreeNodesByUserId(Long sysmanUserId);
    
    /**
     * 根据 角色id ，删除此角色下所有资源
     * @param sysmanRoleId	角色id
     * @return
     */
    int deleteBySysmanRoleId(Long sysmanRoleId);
    
}